//
//  LYCNetworkTool.h
//  爱鲜蜂
//
//  Created by 廖易诚 on 16/6/17.
//  Copyright © 2016年 itcast. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef enum : NSUInteger {
    GET,
    POST

} Method;

typedef void(^success)(NSURLSessionDataTask * task, id responseObject);
typedef void(^failure)(NSURLSessionDataTask * task, NSError * error);
typedef void(^progress)(NSProgress * downloadProgress);

@interface LYCNetworkTool : NSObject
+ (instancetype)shareTool;

- (void)requestMethod:(Method)method urlString:(NSString *)urlString params:(NSDictionary *)params progress:(progress)progress success:(success)success failure:(failure)failure;
@end
